package com.spring.security.core.authtication;

import lombok.extern.log4j.Log4j2;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;

/**
 * 默认的 ResourceAuthenticationService
 * @author seabed_moon
 */
@Log4j2
@Service
public class DefaultResourceAuthenticationServiceImpl implements ResourceAuthenticationService {

    /**
     * 资源是否存在
     *
     * @param mobile 手机号
     * @return
     */
    @Override
    public boolean resource(String mobile) {
        log.warn("请配置 ResourceAuthenticationService 接口的实现.");
        throw new UsernameNotFoundException(mobile);
    }
}
